package com.hundsun.cprs.yyt.service.quota.domain;

import com.hundsun.cprs.yyt.common.base.DomainBase;

public class QuotaHold extends DomainBase {
    private Long id;

    private Long quotaId;

    private Long userId;

    private String fundAccount;

    private Long currentQuota;

    private Long freezeQuota;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getQuotaId() {
        return quotaId;
    }

    public void setQuotaId(Long quotaId) {
        this.quotaId = quotaId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getFundAccount() {
        return fundAccount;
    }

    public void setFundAccount(String fundAccount) {
        this.fundAccount = fundAccount;
    }

    public Long getCurrentQuota() {
        return currentQuota;
    }

    public void setCurrentQuota(Long currentQuota) {
        this.currentQuota = currentQuota;
    }

    public Long getFreezeQuota() {
        return freezeQuota;
    }

    public void setFreezeQuota(Long freezeQuota) {
        this.freezeQuota = freezeQuota;
    }

    /**
     * 可用数量 = 当前数量 - 冻结数量
     * */
    public Long getCanUseAmount(){
        return this.currentQuota - this.freezeQuota;
    }
}